import java.util.Scanner;

public class Practice06 {
    public static void main(String[] args) {
        //给定一个整数数组，输入一个值 n, 输出去掉数组中第 n 大的数后的数组。
        int[] num = {8, 12, 6, 54, 21, 63, 45, 33, 20, 17, 25};
        for (int i = 0; i < num.length - 1 ; i++) {
            for (int j = 0; j < num.length - 1 - i ; j++) {
                if (num[j] < num[j + 1] ){
                    int temp = num[j + 1];
                    num[j + 1] = num [j];
                    num[j] = temp;
                }
            }
        }
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个值 n：");
        int number = sc.nextInt();
        System.out.println(num[number - 1]);
        int[] Newarr = new int[num.length - 1];
        for (int i = 0; i < num.length - 1 ; i++) {
            Newarr[i] = num[i];
            if(Newarr[i] == num[number - 1]){
               continue;
            }
            System.out.print(Newarr[i] + "\t");
        }
    }
}
